Skip to content

fix(cli): resolve plugins relative to the package context #5794

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jan 22, 2021

Conversation

merceyz
Copy link
Contributor

@merceyz merceyz commented Aug 16, 2020

@vue/cli-service is trying to resolve plugins on behalf of itself instead of the pkgContext which makes it rely on hoisting to bring it to an accessible location which is not guaranteed, especially in monorepos

https://yarnpkg.com/advanced/rulebook#packages-should-only-ever-require-what-they-formally-list-in-their-dependencies

Ref yarnpkg/berry#964
Ref #5135

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Underlying tools
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

@yoyo930021
Copy link
Member

#5135

@merceyz
Copy link
Contributor Author

merceyz commented Sep 15, 2020

Not sure how to deal with the failing tests, @sodatea could I get some assistance please?

@merceyz merceyz changed the title fix: improve monorepo and PnP compatability fix(cli): resolve plugins relative to the package context Nov 4, 2020
@merceyz
Copy link
Contributor Author

merceyz commented Dec 8, 2020

Tests finally pass 🎉

@merceyz merceyz force-pushed the merceyz/resolve branch 2 times, most recently from ac925ca to 21dc7e8 Compare December 14, 2020 09:39
@haoqunjiang haoqunjiang merged commit b69697e into vuejs:dev Jan 22, 2021
@merceyz merceyz deleted the merceyz/resolve branch January 22, 2021 08:04
@merceyz
Copy link
Contributor Author

merceyz commented Aug 22, 2021

@sodatea Is there a chance this could be backported to v4?

@scinos
Copy link

scinos commented Feb 17, 2022

Happy to work in the backport, if we are willing to accept it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants